# Top-level convenience Makefile to dispatch to project-specific roadmaps (2025-10-28).

MAKEFLAGS += --no-print-directory

.PHONY: help summary todo done streams lint test \
	flex.summary flex.todo flex.done flex.streams flex.lint \
	gsi.summary gsi.todo gsi.done gsi.streams gsi.lint \
	wrf.summary wrf.todo wrf.done wrf.streams wrf.lint \
	parity.summary parity.todo parity.done

FLEX_MAKE := projects/flexinvert/Makefile
GSI_MAKE := projects/gsi/Makefile
WRF_MAKE := projects/wrf/Makefile

help:
	@echo "Usage:"
	@echo "  make summary        # show all project summaries"
	@echo "  make todo           # show all pending items"
	@echo "  make done           # show completed rollups"
	@echo "  make streams        # list stream keys per project"
	@echo "  make lint           # warn about dependency inconsistencies"
	@echo "  make test           # run task catalogue regression checks"
	@echo "  make parity.todo    # show parity-related pending items across projects"
	@echo "  make parity.summary # show parity-related summaries across projects"
	@echo "  make parity.done    # show completed parity items across projects"
	@echo ""
	@echo "Per-project targets:"
	@echo "  make flex.summary   (also flex.todo, flex.done, flex.streams)"
	@echo "  make gsi.summary    (also gsi.todo, gsi.done, gsi.streams)"
	@echo "  make wrf.summary    (also wrf.todo, wrf.done, wrf.streams)"

summary: flex.summary gsi.summary wrf.summary
	@:

todo: flex.todo gsi.todo wrf.todo
	@:

done: flex.done gsi.done wrf.done
	@:

streams: flex.streams gsi.streams wrf.streams
	@:

lint: flex.lint gsi.lint wrf.lint
	@:

test: scripts/verify_tasks.py
	./scripts/verify_tasks.py

flex.lint:
	@$(MAKE) -f $(FLEX_MAKE) lint

gsi.lint:
	@$(MAKE) -f $(GSI_MAKE) lint

wrf.lint:
	@$(MAKE) -f $(WRF_MAKE) lint

flex.summary:
	@$(MAKE) -f $(FLEX_MAKE) summary

flex.todo:
	@$(MAKE) -f $(FLEX_MAKE) todo

flex.done:
	@$(MAKE) -f $(FLEX_MAKE) done

flex.streams:
	@$(MAKE) -f $(FLEX_MAKE) streams

gsi.summary:
	@$(MAKE) -f $(GSI_MAKE) summary

gsi.todo:
	@$(MAKE) -f $(GSI_MAKE) todo

gsi.done:
	@$(MAKE) -f $(GSI_MAKE) done

gsi.streams:
	@$(MAKE) -f $(GSI_MAKE) streams

wrf.summary:
	@$(MAKE) -f $(WRF_MAKE) summary

wrf.todo:
	@$(MAKE) -f $(WRF_MAKE) todo

wrf.done:
	@$(MAKE) -f $(WRF_MAKE) done

wrf.streams:
	@$(MAKE) -f $(WRF_MAKE) streams

parity.summary:
	@$(MAKE) STREAMS="PARITY SOLVER SCALING VALIDATION" -f $(FLEX_MAKE) stream.summary
	@$(MAKE) STREAMS="SP2 SP3 SP5 SP6 CROSS" -f $(GSI_MAKE) stream.summary
	@$(MAKE) STREAMS="MCV_NEW SEM_NEW PROGRAM_GOAL" -f $(WRF_MAKE) stream.summary

parity.todo:
	@$(MAKE) STREAMS="PARITY SOLVER SCALING VALIDATION" -f $(FLEX_MAKE) stream.todo
	@$(MAKE) STREAMS="SP2 SP3 SP5 SP6 CROSS" -f $(GSI_MAKE) stream.todo
	@$(MAKE) STREAMS="MCV_NEW SEM_NEW PROGRAM_GOAL" -f $(WRF_MAKE) stream.todo

parity.done:
	@$(MAKE) STREAMS="PARITY SOLVER SCALING VALIDATION" -f $(FLEX_MAKE) stream.done
	@$(MAKE) STREAMS="SP2 SP3 SP5 SP6 CROSS" -f $(GSI_MAKE) stream.done
	@$(MAKE) STREAMS="MCV_NEW SEM_NEW PROGRAM_GOAL" -f $(WRF_MAKE) stream.done
